package com.chiasma.studioadmin.client.controller;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TabPanel;

public class GlobalViewController {
	
	//declare UI elements
	private TabPanel tabPanel = new TabPanel();
	
	//declare UI controllers
	private StudentViewController studentViewController;
	
	public GlobalViewController(){
		studentViewController = new StudentViewController(this);
		setupUI();
	}
	
	private void setupUI() {
		
		tabPanel.setAnimationEnabled(true);
		tabPanel.setSize("100%", "500px");
		
		//Getting the Widgets into the TabPanel
		tabPanel.add(new HTML("System Dashboard"), "Dashboard");
		tabPanel.add(studentViewController.getStudentRecord(), "Student Record");
		tabPanel.add(new HTML("Payment Information Enquires"), "Payment Record");
		tabPanel.add(new HTML("Scheduler"), "Schedules");
		tabPanel.add(new HTML("Utilities and Reports"), "Utilities");
		
		//default select the first tab
		tabPanel.selectTab(1);
		RootPanel.get("mainPanel").add(tabPanel);
	}
}
